<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The libXMLError class</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="libxml.constants.html">« 预定义常量</a></li>
      <li style="float: right;"><a href="ref.libxml.html">libxml 函数 »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.libxml.html">libxml</a></li>
    <li>The libXMLError class</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="class.libxmlerror" class="reference">
 <h1 class="title">The libXMLError class</h1>
 
 
 <div class="partintro"><p class="verinfo">(PHP 5 &gt;= 5.1.0, PHP 7, PHP 8)</p>
 

  <div class="section" id="libxmlerror.intro">
   <h2 class="title">简介</h2>
   <p class="para">
    Contains various information about errors thrown by libxml. The error codes
    are described within the official 
    <a href="http://www.xmlsoft.org/html/libxml-xmlerror.html" class="link external">&raquo;&nbsp;xmlError API documentation</a>.
   </p>

  </div>

 
  <div class="section" id="libxmlerror.synopsis">
   <h2 class="title">类摘要</h2>
 

   <div class="classsynopsis">
    <div class="ooclass"></div>
 

    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">class</span> <strong class="classname">libXMLError</strong>
     </span>
     {</div>

 
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 属性 */</div>
    <div class="fieldsynopsis">
     <span class="modifier">public</span>
     <span class="type">int</span>
      <var class="varname"><a href="class.libxmlerror.html#libxmlerror.props.level">$<var class="varname">level</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="type">int</span>
      <var class="varname"><a href="class.libxmlerror.html#libxmlerror.props.code">$<var class="varname">code</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="type">int</span>
      <var class="varname"><a href="class.libxmlerror.html#libxmlerror.props.column">$<var class="varname">column</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="type">string</span>
      <var class="varname"><a href="class.libxmlerror.html#libxmlerror.props.message">$<var class="varname">message</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="type">string</span>
      <var class="varname"><a href="class.libxmlerror.html#libxmlerror.props.file">$<var class="varname">file</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="type">int</span>
      <var class="varname"><a href="class.libxmlerror.html#libxmlerror.props.line">$<var class="varname">line</var></a></var>;</div>

   }</div>

  </div>
 

  <div class="section" id="libxmlerror.props">
   <h2 class="title">属性</h2>
   <dl>
    
     <dt id="libxmlerror.props.level"><var class="varname">level</var></dt>

     <dd>

      <p class="para">
       the severity of the error (one of the following constants:
       <strong><code>LIBXML_ERR_WARNING</code></strong>,
       <strong><code>LIBXML_ERR_ERROR</code></strong> or
       <strong><code>LIBXML_ERR_FATAL</code></strong>)
      </p>
     </dd>

    
    
     <dt id="libxmlerror.props.code"><var class="varname">code</var></dt>

     <dd>

      <p class="para">
       The error&#039;s code.
      </p>
     </dd>

    
    
     <dt id="libxmlerror.props.column"><var class="varname">column</var></dt>

     <dd>

      <p class="para">
       The column where the error occurred.
      </p>
      <blockquote class="note"><p><strong class="note">注意</strong>: 
       <p class="para">
        This property isn&#039;t entirely implemented in libxml and therefore
        <code class="literal">0</code> is often returned.
       </p>
      </p></blockquote>
     </dd>

    
    
     <dt id="libxmlerror.props.message"><var class="varname">message</var></dt>

     <dd>

      <p class="para">
       The error message, if any.
      </p>
     </dd>

    
    
     <dt id="libxmlerror.props.file"><var class="varname">file</var></dt>

     <dd>

      <p class="para">The filename, or empty if the XML was loaded from a string.</p>
     </dd>

    
    
     <dt id="libxmlerror.props.line"><var class="varname">line</var></dt>

     <dd>

      <p class="para">
       The line where the error occurred.
      </p>
     </dd>

    
   </dl>

  </div>

 
 </div>
 
</div>
</div></div></body></html>